package org.drjava.service;/**
 * Created by jiangchen on 2017/7/20.
 */

import java.util.List;
import lombok.extern.slf4j.Slf4j;
import org.drjava.dao.mapper.master.CallRecordMapper;
import org.drjava.dao.mapper.slave.IuserMapper;
import org.drjava.dao.model.master.CallRecord;
import org.drjava.dao.model.slave.Iuser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 陈江
 * @version 1.0
 * @date 2017/7/20
 */
@Slf4j
@Service
public class IuserService {
  @Autowired
  private IuserMapper iuserMapper;


  public Iuser getOne(String host,String user){
    Iuser iuser = new Iuser();
    iuser.setHost(host);
    iuser.setUser(user);
    return iuserMapper.selectOne(iuser);
  }

  public int  putBatch(List<Iuser> list){
    return iuserMapper.insertList(list);
  }

}